package cn.jzq.kotoba.common.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static cn.jzq.kotoba.common.consts.MqQueueConst.LOG_QUEUE;
import static cn.jzq.kotoba.common.consts.MqQueueConst.MOBILE_CODE_QUEUE;

/**
 * rabbitmq config
 * @author jzq
 * @date 2018-09-09
 *
 */
@Configuration
public class RabbitConfig {

    /**
     * 初始化log队列
     * @return queue
     */
    @Bean
    public Queue initLogQueue() {
        return new Queue(LOG_QUEUE);
    }

    /**
     * 初始化短信验证码队列
     * @return queue
     */
    @Bean
    public Queue initMobileCodeQueue() {
        return new Queue(MOBILE_CODE_QUEUE);
    }
}
